<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>规则设定 意向客户分成设置</title>
<link href="${rc.contextPath}/common/css/common/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${rc.contextPath}/common/js/thickbox/jquery.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/thickbox/thickbox.js"></script>
<style type="text/css">
	.intentionCustomBrokerageSet{border:solid 1px gray; width:500px; height:250px;display:none; z-index:101;position:absolute; background-color:#FFFFFF;}
	.intentionCustomBrokerageSet .title{width:100%;height:20px;line-height:50px; border-top:solid 1px red;background-color:#b60613;top:0px;}
	#greyBackGround{background:#000000;width:100%; display:none; z-index:100; top:0px; left:0px; position:absolute;}
</style>
<script type="text/javascript" src="${rc.contextPath}/common/js/main.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/ruleSet/intentionCustomBrokerageSet.js"></script>
</head>
<body>
<div class="main">
	<div class="position">
	<div class="p_left">当前位置：规则设定> 意向客户分成设置</div>
	<div class="p_right">
    	<dl><dt>姓名：</dt><dd>${currentUser.ename}</dd></dl>
    	<dl><dt>登录时间：</dt><dd><span id="nowDate"></span></dd></dl>
  	</div>
  	</div>
	<div class="topBox">
    	<div class="mesCheck">
      	<div class="title1"><strong>意向客户分成设置</strong></div>
   		<div class="box2C"><br/>
      		<table  class="tab2" cellpadding="0" align="center" width="90%;" style="text-align: center;">
      			<tr style="background-color: gray;">
      				<td colspan="8">商品线规则设置</td>
      			</tr>
      			<tr style="background-color: gray;">
      				<td>选择</td>
      				<td>商品类别</td>
      				<td>意向客户成单率</td>
      				<td>单笔奖金</td>
      				<td>是否挂钩成单率</td>
      				<td>推送分成</td>
      				<td>是否挂钩成单率</td>
      				<td>操作</td>
      				
      			</tr>
      			#foreach($product in $pageView.records)
      			<tr>
      				<td>
      				#if($product.isEffectCustomDivided!=2)
      					<input id="bath_$product.id" type="checkbox"/>
      				#end
      				</td>
      				<td>#if($product.productName)$product.productName#end</td>
      				<td>$!product.singleRate</td>
      				<td>#if($product.singlePushMoney)$!product.singlePushMoney#end</td>
      				<td>#if($product.isUseSingleRateForPushMoney==1)是#else否#end</td>
      				<td>#if($product.divide)$!product.divide#end</td>
      				<td>#if($product.isUseSingleRateForPushDivided==1)是#else否#end</td>
      				<td>
      				#if($product.isEffectCustomDivided)
      					#if($product.isEffectCustomDivided==2)
      						(审批中)
      					#elseif($product.isEffectCustomDivided==1)
      					#if($shiro.hasPermission("意向客户分成设置"))
      						<a href="javaScript:intentionCustomBrokerageSet('$product.id');">设置</a>
      					#end
      						(审批通过)
      					#elseif($product.isEffectCustomDivided==0)
      					#if($shiro.hasPermission("意向客户分成设置"))
      						<a href="javaScript:intentionCustomBrokerageSet('$product.id');">设置</a>
      					#end
      						(审批未通过 )   					
      					#end
      				#else
      					#if($shiro.hasPermission("意向客户分成设置"))
      						<a href="javaScript:intentionCustomBrokerageSet('$product.id');">设置</a>
      					#end
      				#end
      				</td>
      			</tr>
      			#end
      		</table><br/>
      		#if($shiro.hasPermission("意向客户分成批量设置"))
      			<input onclick="javaScript:bathIntentionCustomBrokerageSet();" type="button" value="批量设置" style="margin-left: 40px;"/><br/>
      		#end
      		
    <!-- #BeginLibraryItem "/Library/page.lbi" -->
    #set($endPage=$pageView.startPage + $pageView.pageSize)
    #set($pageNow=$pageView.pageNow + 1)
    #set($pageBack=$pageView.pageNow - 1)
    <input type="hidden" value="${pageView.pageCount}" id="pageCount"/>
    <div class="page clearfix">
      <ul class="le">
        <li>显示<span>${pageView.startPage}-${endPage}</span></li>
        <li>共<span>${pageView.rowCount}</span>条</li>
        <li><span>${pageView.pageNow}</span>页</li>
      </ul>
      <ul class="ri">
        <li><a href="javascript:;configPageController('jump')" class="go">&nbsp;</a></li>
        <li>到
          <input type="text" class="input" id="pageJump" size="4" />
          页</li>
        <li><a href="javascript:;configPageController('${pageView.pageCount}')" class="btn">[末页]</a></li>
        <li><a href="javascript:;configPageController('${pageNow}')" class="btn">[下页]</a></li>
        <li><a href="javascript:;configPageController('${pageBack}')" class="btn">[前页]</a></li>
        <li><a href="javascript:;configPageController('1')" class="btn">[首页]</a></li>
      </ul>
    </div>
    <!-- #EndLibraryItem -->
   <script>
	//分页
	function configPageController(value) {
		var pageCount=$("#pageCount").val();
		if(value<1){
			value=1;
		}
		if(value=="jump"){
			value=$("#pageJump").val();
		}
		if(parseInt(value)>parseInt(pageCount)){
			value=pageCount;
		}
		window.location="${rc.contextPath}/ruleSet/intentionCustomBrokerageSet/intentionCustomBrokerageSetPage?pageNow="+value;
	}
	</script>


      		<div id="aSingleRate" class="intentionCustomBrokerageSet" style="width: 500px;height: 230px;">
			   	<div class="title"></div>
			   	<div style="margin-left: 20px;">意向客户成单率</div>
			   	<div style="margin-left: 20px;">
					意向客户成单率：<input id="addSingleRate" type="text" maxlength="3" />&nbsp;&nbsp;%&nbsp;&nbsp;<br/><br/><br/>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<input id="aSingleRateBtn" type="button" value="确定" />
					<input id="aSingleRateBtnCancel" type="button" value="取消"/>
				</div>   
			</div>
      		<div id="intentionCustomBrokerageSet" class="intentionCustomBrokerageSet" style="width: 500px;height: 230px;">
      		<form id="brokerageForm" action="${rc.contextPath}/ruleSet/intentionCustomBrokerageSet/updateBrokerage" method="post">
      			<input id="productIdStr" name="productIdStr" type="hidden"/>
      			<input id="productId" name="productId" type="hidden"/>
			   	<div class="title"></div>
			   	<div style="margin-left: 20px;">意向客户分成设置</div>
			   	<div style="margin-left: 20px;">
					单笔奖金：<input id="singlePushMoney" name="singlePushMoney" type="text" maxlength="9"/>&nbsp;&nbsp;
					元&nbsp;&nbsp;
					<input id="isUseRateForPushMoney"  name="isUseSingleRateForPushMoney" type="hidden" />
					<input id="isUseRateForPushDivided"  name="isUseSingleRateForPushDivided" type="hidden" />
					<input id="isUseSingleRateForPushMoney"  type="checkbox" />挂钩成单率<br/>
					推送分成：<input id="pushDivided" name="divide" type="text"  maxlength="3"/>&nbsp;&nbsp;
					%&nbsp;&nbsp;&nbsp;
					<input id="isUseSingleRateForPushDivided"  type="checkbox" />挂钩成单率<br/>
					意向客户成单率：<input id="singleRate" name="singleRate" type="text" maxlength="3" /><br/><br/><br/>
					<input id="intentionCustomBrokerageSetBtnCancel" type="button" style="float:right;margin-right:20px;" value="取消"/>
					<input id="bathIntentionCustomBrokerageSetBtn" type="button" style="display: block;float:right; margin-right: 20px;" value="应用"/>
					<input id="intentionCustomBrokerageSetBtn" type="button" style="display: block;float:right; margin-right: 20px;" value="应用"/>
				</div> 
				</form>
			</div>
		<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
		</div>
		</div>
	</div>
</div>
</body>
</html>
